package dao;

import pojo.Food;
import pojo.OrderFood;

import java.util.List;

public interface OrderFoodDao {

    /**
     * 通过订单id查找所有食品信息
     * @param orderId
     * @return
     */
    public List<OrderFood> findOrderFoodByOrderId(String orderId);

    /**
     * 添加第一次点的菜品
     * @param orderId
     * @param food
     * @return
     */
    public Integer addNewOrderFood(String orderId, Food food);

    /**
     *添加已经有的菜品
     * @param orderId
     * @param foodId
     * @param foodCount
     * @param foodMoney
     * @return
     */
    public Integer addOrderFood(String orderId, String foodId, String foodCount, String foodMoney);

    /**
     * 删除
     * @param orderId
     * @param foodId
     * @return
     */
    public Integer delete(String orderId,String foodId);

    /**
     * 减少订单中的某项食品
     * @param orderFoodId
     * @param foodId
     * @param foodCount
     * @return
     */
    public Integer subOrderFood(String orderFoodId, String foodId, String foodCount);
}
